package com.gw.business.analysis.service.impl;


import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;

import com.gw.business.analysis.model.UserTrackDataAverage;
import com.gw.business.analysis.model.UserTrackDataStatistics;
import com.gw.business.analysis.service.UserTrackDataStatisticsService;
import com.gw.platform.service.impl.DefaultService;
@Service
public class UserTrackDataStatisticsServiceImpl extends DefaultService implements
		UserTrackDataStatisticsService {

	 @Override
	    public Boolean insert(List<UserTrackDataStatistics> list) {
	        try {
	            this.insert("UserTrackDataStatistics_inset", list);
	        } catch (Exception e) {
	            return false;
	        }
	        return true;
	    }
	    
	    @Override
	    public Boolean update(UserTrackDataStatistics userTrackDataStatistics) {
	        try {
	            this.update("UserTrackDataStatistics_update", userTrackDataStatistics);
	        } catch (Exception e) {
	            return false;
	        }
	        return true;
	    }

		@Override
		public List<UserTrackDataStatistics> getHourDate(String dataTime,
				String hours) {
			HashMap map=new HashMap();
			map.put("dataTime",dataTime);
			map.put("hours",hours);
			
		 return	(List<UserTrackDataStatistics>) this.find("UserTrackDataStatistics_getHourDate", map);
		
		}

		@Override
		public List<UserTrackDataAverage> getMouthCountByctmcmdAndutmcsr(
				String year,String month) {
			HashMap map=new HashMap();
			map.put("year",year);
			map.put("month", month);
			return	(List<UserTrackDataAverage>) this.find("UserTrackDataStatistics_getMouthCountByctmcmdAndutmcsr", map);
		}

		

}
